en	If you have any question, or if you want to talk about this plugin, you can join this XMPP room with any Jabber client: [plugin-livechat-support@room.im.yiny.org](xmpp:plugin-livechat-support@room.im.yiny.org?join).

en	If you want to support the project financially, you can contact me by mail at git.[at].john-livingston.fr, or check my [Liberapay profile](https://liberapay.com/JohnLivingston/).

en	Contributor Covenant Code of Conduct

en	This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html). Translations are available at [https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations). Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement by mail at git.[at].john-livingston.fr.

en	Always talk about features you want to develop by creating/finding and commenting the issue tackling your problem before you start working on it, and inform the community that you begin coding by claiming the issue.

en	Pull Request must be done on the `main` branch.

en	Until march 2023, contribution were made on the `develop` branch. This procedure is now deprecated.

en	Prerequisite for building this plugin

en	It is highly recommended to be familiar with following concepts:

en	Git

en	NodeJS

en	NPM

en	Typescript

en	To build the plugin, you must have following packages:

en	`git`

en	`npm` (>=8.x)

en	`nodejs` (>=14.x)

en	`build-essential`

en	Please note that this plugin needs an AppImage for the Prosody XMPP server. This AppImage is provided by the [Prosody AppImage](https://github.com/JohnXLivingston/prosody-appimage) sideproject. The `build-prosody.sh` script download binaries attached to this remote repository, and checks that their sha256 hashsum are correct.

en	Clone the repository, buid the plugin, and create your feature branch:

en	# Clone the repository. Dont forget the --recursive to clone submodules. git clone https://github.com/JohnXLivingston/peertube-plugin-livechat.git --recursive cd peertube-plugin-livechat # Install NPM dependencies and build the module for the first time: npm install # Build the plugin after a modification: npm run build # If you have a fork from the repository, add it as remote (example): git remote add me git@github.com:MY_GITHUB_ACCOUNT/peertube-plugin-livechat.git # Create a local branch for you developments, and checkout it (example): git checkout my_development # Note: if an issue is associated, use fix_1234 as your branch name (where 1234 is the issue's number) # To propose your modifications, push your branch to your repository (example): git push --set-upstream me my_development # Then go to your github repository with your web browser to propose the Pull Request (see additional instructions below)

en	Once you are ready to show your code to ask for feedback, submit a *draft* Pull Request. Once you are ready for a code review before merge, submit a Pull Request. In any case, please link your PR to the issues it solves by using the GitHub syntax: "fixes #issue_number".

en	The front-end code is in the `client` folder, the back-end code in `server`. There are some shared code in `shared` folder.

en	For general instructions (developping plugins, building, installation, ...), please refer to the [Peertube documentation](https://docs.joinpeertube.org/contribute-plugins?id=write-a-plugintheme).

en	You can build the plugin with extra debug features simply by using:

en	ESBuild vs Typescript

en	This plugin uses ESBuild for frontend code generation, as the official `peertube-plugin-quickstart` plugin. ESBuild can handle Typescript, but does not check types (see [ESBuild documentation](https://esbuild.github.io/content-types/#typescript)). That's why we first compile Typescript with the `-noEmit` option, just to check types (`check:client:ts` in package.json file). Then, if everything is okay, we run ESBuild to generate the compiled javascript.

en	Debug Mode

en	There is a debug mode for this plugin, that shorten some delay. For example, some log files will rotate every two minutes, instead of once per day. This permit to test more easily certain actions, for which it could normally take hours or days to wait.

en	To enable this mode, you juste have to create the `/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/debug_mode` file (replacing `/var/www/peertube/storage/` by the correct path on your installation).

en	The simple existence of this file is sufficient to trigger the debug mode. To make sure it's taken into account, you can restart your Peertube instance.

en	This file can contain some JSON to enable more advanced options. To have a list of existing parameters, check `server/lib/debug.ts`. Restart Peertube after each content modification.

en	Don't enable this mode on a production server, neither on a public server. This could cause security issues.

en	When debug mode is enabled, you can restart Prosody using this API call: `http://your_instance.tld/plugins/livechat/router/api/restart_prosody`. This call don't need any authentificaiton. It can be done from a command line, for example using `curl http://your_instance.tld/plugins/livechat/router/api/restart_prosody`.

en	Prosody debugger

en	It is possible to connect the Prosody AppImage to a remote debugger using [MobDebug](https://luarocks.org/modules/paulclinger/mobdebug).

en	To do so, you have to setup MobDebug in a folder that can be accessed by the `peertube` user. Then, add this in the `debub_mode` file:

en	{ "debug_prosody": { "debugger_path": "/the_path_to_mobdebug/src", "host": "localhost", "port": "8172" } }

en	`host` and `port` are optional. `debugger_path` must point to the folder where the `MobDebug` `.lua` file is.

en	Start your debugger server.

en	For Prosody to connect to the debugger, call the API `http://your_instance.tld/plugins/livechat/router/api/restart_prosody?debugger=true`. This call does not need any authentication. It can be done from a command line, for example with `curl http://your_instance.tld/plugins/livechat/router/api/restart_prosody?debugger=true`. You can even configure your debug server to launch this request automatically.

en	Prosody will then restart, connecting to the debugger.

en	Quick dev environment using Docker

en	There is a tutorial, in french, on the [Peertube forum](https://framacolibri.org/t/tutoriel-creer-un-environnement-de-developpement-de-plugin-peertube-rapidement-en-utilisant-docker-et-qui-permet-de-tester-la-federation/17631) that explains how to quickly build a dev env using Docker.

en	A repo was made out of it, check out [pt-plugin-dev](https://codeberg.org/mose/pt-plugin-dev).

en	Note: for an unknown reason, Prosody can't resolve containers DNS address when using the lua-unbound library. There is a dirty hack in the plugin: just create a `/data/plugins/data/peertube-plugin-livechat/no_lua_unbound` file in your docker-volumes, then restart containers.

en	Quickly rebuild and install the plugin

en	When you do modification, you don't have to always rebuild the full project, and reinstall the plugin on your dev environment. You can build only the modified part (for example, if you only modified client files: `npm run build:client`). Check the `package.json` files for available build scripts.

en	When the plugin is already installed on your dev instance, and you haven't changed any dependency, you can quickly install your work by following these steps:

en	re-build necessary parts of the plugin (client, styles, ...),

en	overwrite the `data/plugins/node_modules/peertube-plugin-livechat/dist/` content of your dev instance by the content of the plugin's `dist` folder,

en	change recursively `plugins/node_modules/peertube-plugin-livechat/dist/` files owner to your `peertube` user,

en	restart your instance.

en	Performance tests

en	The [livechat-perf-test](https://github.com/JohnXLivingston/livechat-perf-test) repository contains some tools to make performance tests. It can be used to evaluate code improvements, or find bottlenecks.

en	Document the plugin, or translate the documentation.

en	Always inform the community before working (by creating a new issue, or commenting an existing one). This is to avoid that two persons are working on the same thing, and prevent conflicts.

en	Documentation work has to be merged in the `main` branch.

en	The documentation source code is in the `support/documentation/content` folder.

en	The documentation is generated using [Hugo](https://gohugo.io/). You have to install it on your computer if you want to preview your work.

en	The used theme is [hugo-theme-learn](https://learn.netlify.app/). You should read its documentation before starting editing the documentation.

en	When a new plugin version is released, or when documentation is updated, plugin maintainers will merge the `main` branch to the `documentation` branch. This will trigger github and gitlab pipelines, and update published documentation.

en	The `support/documentation/content/en` folder contains only english documentation files.

en	Documentation is translated using Weblate (see the [translation documentation](/peertube-plugin-livechat/contributing/translate/)). To do so, we use the [po4a tool](https://po4a.org/), as we will se later in this page.

en	In the `support/documentation/config.toml` file, please copy and modify the `[Languages.fr]` section.

en	If the translations are not complete, it does not matter, english will be used for missing strings.

en	Preview

en	To preview your modifications, just run:

en	Then open your browser on the address [http://localhost:1313/peertube-plugin-livechat/](http://localhost:1313/peertube-plugin-livechat/). This page will automatically refresh on each modification.

en	Update localization files and generate documentation translations

en	For now, you only have the english version. To update documentation strings, and generate translations, you have to run the `doc-translate.sh` script.

en	To do so, make sure you have `po4a` (version >= 0.69) installed on your computer.

en	Some linux distro (like Debian Bullseye for example) have too old version of `po4a`. Please make sure to install a compatible version. If you are using Debian Bullseye for example, you can download the Bookworm po4a.deb file from [https://packages.debian.org](https://packages.debian.org/bookworm/all/po4a/download), and install it manually.

en	To handle translations, just do:

en	You can then preview the result using `hugo serve -s support/documentation/`, and using the language selector.

en	Write documentation

en	Just edit the english files in `support/documentation/content/en`.

en	Then, before commiting, always run `npm run doc:translate`, so that changes in english files can be propagated to the `support/documentation/po/livechat.en.pot` file.

en	You can use the `livechat_label` short code to use application strings. See here: [Documentation translation](/peertube-plugin-livechat/contributing/translate/#documentation-translation).

en	It is possible to prevent a file from beeing translating, using `livechatnotranslation: true` in the Yaml Font Matter section. See here: [Documentation translation](/peertube-plugin-livechat/contributing/translate/#documentation-translation).

en	Please use the `livechatnotranslation` option for technical documentation. We don't want technical documentation to be translated, to avoid issues because of a wrong translation.

en	To facilitate translators work, avoid making too long paragraphs.

en	For now, it is not possible to use Markdown tables: the translation tools will break them.

en	There may be links to documentation elsewhere on the web. Try not to change the urls of the documentation pages. Or at the very least, put links to the new location on the previous url.

en	What if I can't use hugo and/or po4a?

en	Just edit english markdown files, and specify that you can't build translations when you make your Pull Request.

en	Publication

en	Publishing the documentation is automatic, as soon as the changes are merged into the `documentation` branch.

en	You don't need to know how to code to start contributing to this plugin! Other contributions are very valuable too, among which: you can test the software and report bugs, you can give feedback, features that you are interested in, user interface, design, ...

en	Interested in contributing? Awesome!

en	You can contribute to this plugin translation. Translations are handled using the [Weblate](https://weblate.org/) software, using [Framasoft Weblate instance](https://weblate.framasoft.org/).

en	Never modify directly files in the `languages` folder, this could lead to conflicts.

en	How to

en	Create an account: https://weblate.framasoft.org/accounts/register/

en	Validate your email and follow the link sent

en	Create your password and setup your account

en	Go to the plugin project page: https://weblate.framasoft.org/projects/peertube-livechat/peertube-plugin-livechat/

en	Choose the locale you want to translate

en	Just translate missing sentences, or correct the ones that seems incorrect to you.

en	There might be some «very technical» strings. If you are not 100% sure of the meaning, or of your translation, you better not translate it, so it will display in english.

en	ConverseJS translations
ar	الترجمات

en	This plugin relies on [ConverseJS](https://conversejs.org/) for the chat front-end. ConverseJS has its own translations, on its own [weblate instance](https://hosted.weblate.org/projects/conversejs/#languages). You can also translate directly in the code repository. For more information, check [ConverseJS translations documentation](https://conversejs.org/docs/html/translations.html).

en	Adding a new locale

en	If you think there is a missing locale, please check first if it is handled in Peertube. If so, you can [open an issue](https://github.com/JohnXLivingston/peertube-plugin-livechat/issues) to ask for it.

en	Adding new strings / use translations in the code

en	If you are working on new features, and need new strings, you can create them directly in Weblate. The english version is mandatory. Start with it.

en	Each string is linked to a key (for example `use_chat`). Choose an explicit key in english, lower case.

en	If you have to test new strings without waiting for a Weblate merge, you can modify `languages/*.yml` files, but avoid to commit these changes (to minimize conflict risks).

en	Use translations in front-end code

en	Before using a string in front-end, you need to declare a new constant in `client/@types/global.d.ts`. The constant name must:

en	start with the prefix "LOC_"

en	use the string key, upper cased

en	you just have to declare its type, not its value

en	For example, to use "use_chat", you have to declare:

en	declare const LOC_USE_CHAT: string

en	The `build-client.js` script will read the `client/@types/global.d.ts`, search for such constants, and load their values from the languages files.

en	Now, you can simply call `peertubeHelpers.translate(LOC_USE_CHAT)` in your code.

en	Use translations in back-end code

en	In theory, the only parts of the backend code where you need localization is the settings declaration and standardized data (ActivityPub, RSS, ...). Here we need to get english strings from the translation key.

en	Note: you should never need another language translation from backend code. Localization must be done on front-end.

en	There is a `lib/loc.ts` module providing a `loc()` function. Just pass it the key to have the english string: `loc('diagnostic')`'.

en	Documentation translation

en	The documentation translation is done using the corresponding Weblate component.

en	There is a specific "Hugo shortcodes" you can use to display an application string. Saying you want to display the name of the button "open_chat_new_window", you can use this in the documentation markdown file:

en	{{%/* livechat_label open_chat_new_window */%}}

en	You can also prevent a whole page from being translating by adding `livechatnotranslation: true` in the Yaml Font Matter section:

en	--- title: "Third party" description: "Displaying the livechat with 3rd party software." weight: 20 chapter: false livechatnotranslation: true ---

en	Never translate a string in the `livechat.en.pot` file, it would be ignored. Instead, edit directly the markdown files.

en	If a string contains a link, you can change it for the correct link in the translated language. For example, for a link to this documentation, you can add the language code in the url.

en	Some strings are block of code. Don't translate code. But you can translate comments, or parameters if relevant.

en	If you are not sure, just don't translate, and ask what to do.

en	The tool I use to handle translations for the documentation can have strange behaviours. When I add sentences that looks like other existing sentences, it sometimes copies existing translations. So, when you have translations marked as "to check", please make sure it doesn't copy a string that has nothing to do with the english one before validating.

en	If you are now sure about the context of a string, you can check the string location in the weblate's right pane, and open the corresponding documentation page. For example, for a string located in the file `support/documentation/content/en/documentation/user/streamers.md`, the corresponding url is `https://livingston.frama.io/peertube-plugin-livechat/documentation/user/streamers/`.

en	Generic recommandations
ar	معلومات عامة

en	Please be inclusive in your wordings, and please respect the [code of coduct](/peertube-plugin-livechat/contributing/codeofconduct/).

en	Plugin Credits

en	Credits

en	[package.json](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/package.json), [COPYRIGHT](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/COPYRIGHT.md) and [LICENSE](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/LICENSE) files contain the license information for this software and its dependencies.

en	The plugin is maintained by [John Livingston](https://www.john-livingston.fr/).

en	Thanks to David Revoy for his work on Peertube's mascot, [Sepia](https://www.davidrevoy.com/index.php?tag/peertube). The character design is under CC-By licence, and the SVG files used to create some logo and avatars in this plugin are GPLv3.0. PNG files are under CC-By licences, and comes from the [online Sepia Avatar Generator](https://www.peppercarrot.com/extras/html/2023_peertube-generator/).

en	Thanks to [Framasoft](https://framasoft.org) for making [Peertube](https://joinpeertube.org/) possible, for the financial support, and for hosting the project translations on their [Weblate instance](https://weblate.framasoft.org).

en	Thanks to [ritimo](https://www.ritimo.org/) for the financial support.

en	Thanks to [Code Lutin](https://www.codelutin.com/) and [Rétribution Copie Publique](https://copiepublique.fr/) for the financial support.

en	Thanks to [NlNet](https://nlnet.nl/) and the [NGI0 Entrust fund](https://nlnet.nl/entrust/) for the financial support.

en	Thanks to [Octopuce](https://www.octopuce.fr/) for the financial support.

en	And thanks to all individual contributors who have made a donation via my [liberapay page](https://liberapay.com/JohnLivingston/).

en	Some advanced features

en	Advanced usage

en	Using Matterbridge to bridge with other chats

en	Using Matterbridge

en	Here is a tutorial to use Matterbridge with the plugin: <https://gitlab.com/refrac/obs-matterbridge-overlay/-/blob/master/documentation/peertube.md>

en	Allow connections using XMPP clients

en	XMPP clients

en	This chat module is based on the XMPP protocol, also known as Jabber. It is therefore possible to connect to the chats using [XMPP client software](https://en.wikipedia.org/wiki/XMPP#Clients). This can for example be useful to facilitate moderation operations.

en	For the user documentation associated with these features, please refer to the [user documentation page](/peertube-plugin-livechat/documentation/user/xmpp_clients/).

en	Enabling these features requires configuration changes on the server, and on the DNS records. It is not possible to configure this only from the Peertube interface, and it requires some basic system some basic system admin skills.

en	Login to your Peertube account

en	This feature is not yet available, and will come in a future version of the plugin.

en	Connection using an external XMPP account

en	To enable this feature, you will need to set up your server and DNS records, so that XMPP clients can find and access the [Prosody server](https://prosody.im) that this plugin uses internally.

en	Plugin settings

en	Start by going to the livechat plugin settings of your instance, then enable the setting "Enable connection to room using external XMPP accounts". By checking this settings, new settings appear below.

en	First of all, the "Prosody server to server port" field. This one defaults to 5269, which is the standard port for this service. You can however change to another port, if this is already in use on your server.

en	Next, the field "Server to server network interfaces" field allows you to specify which network interfaces the server should listen on. The default value "*, ::" indicates to listen on all IP addresses. You can change these values, if you wish to listen on only certain IP addresses. The syntax is explained next to the setting.

en	For the "Certificate folder" setting, you can leave it empty. In this case, the plugin will automatically generate self-signed certificates. Some XMPP servers may refuse to connect, depending on their configuration. In this case, you can indicate here a path on the server, in which you must place certificates to be used by the module. It is up to you to generate and renew them. See bellow for more information.

en	Firewall

en	You must open the configured port (5269 by default) on your firewall.

en	If you are using Docker for your Peertube, you need to modify the `docker-compose.yml` file to open port 5269 of the `peertube` container, so that the outer world can connect to it.

en	DNS

en	You need to add [DNS records](https://prosody.im/doc/dns) allowing remote servers to find "room.your_instance.tld" and "external.your_instance.tld" components.

en	The easiest way to do this is to add SRV records for the "room" and "external" [subdomain](https://prosody.im/doc/dns#subdomains):

en	record name: _xmpp-server._tcp.room.your_instance.tld. (replace «your_instance.tld» by your instance uri)

en	TTL: 3600

en	class: IN

en	SRV: 0

en	priority: 0

en	weight: 5

en	port: 5269 (adapt if your changed the default port)

en	target: your_instance.tld. (replace by your instance uri)

en	record name: _xmpp-server._tcp.external.your_instance.tld. (replace «your_instance.tld» by your instance uri)

en	Be careful to keep the dot after "your_instance.tld".

en	Using the `dig` command to check your records, you should get a result similar to this:

en	$ dig +short _xmpp-server._tcp.room.videos.john-livingston.fr. SRV 0 5 5269 videos.john-livingston.fr. $ dig +short _xmpp-server._tcp.external.videos.john-livingston.fr. SRV 0 5 5269 videos.john-livingston.fr.

en	If you are **not using the standard `5269` port**, you must also add a SRV record for `_xmpp-server._tcp.your_instance.tld.` (same as above, just without the `room.` prefix). Of course, you can also add this record if you use the standard port. It will also work.

en	Using trusted certificates

en	The self-signed certificates that this plugin uses by default can be rejected by some XMPP servers, for security reasons.

en	It is possible to use certificates validated by a certification authority. However, this requires advanced system administration knowledge. Indeed, due to the multitude of possible use cases, it is impossible to document all situations here. This documentation will therefore only explain the goal to be reached, and give an example which will only be suitable for a "basic" situation (manual installation of Peertube, using letsencrypt). If you are in another situation (Docker installation, certificates signed by another authority, etc...), you will have to adapt this approach by yourself.

en	Basic principle

en	It is up to you to generate valid certificates for domains `your_instance.tld` and `room.your_instance.tld`. You can use any [method supported by Prosody](https://prosody.im/doc/certificates).

en	You must then place these certificates in a folder that will be accessible to the `peertube` user, and specify this folder in the plugin setting "Certificate folder".

en	If you want to use the ProsodyCtl utility to import certificates, this utility is available (once Peertube is started) using the following command (adapting the path to your Peertube data folder, and replacing "xxx" with the arguments you wish to pass to prosodyctl): `sudo -u peertube /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosodyAppImage/squashfs-root/AppRun prosodyctl xxx`

en	The plugin will check once a day to see if any files have been modified in this folder, and reload Prosody if necessary.

en	Method for the simple case

en	We assume here that your Peertube installation is "classic" (no use of Docker), and that the certificates are generated by letsencrypt, using the certbot tool.

en	First of all, we'll have to create a certificate for the subdomain `room.your_instance.tld` : this is the uri of the MUC (XMPP chat rooms) component. Even if the connections are made on `your_instance.tld`, we will need a valid certificate for this subdomain.

en	So start by setting up a DNS entry for `room.your_instance.tld`, which points to your server. You can use a CNAME entry (or an A entry and a AAAA entry).

en	Next, we'll use nginx (already installed for your Peertube) to generate the certbot certificate. We will create a new site. In the file `/etc/nginx/site-available/room.peertube`, add:

en	server { listen 80; listen [::]:80; server_name room.your_instance.tld; location /.well-known/acme-challenge/ { default_type "text/plain"; root /var/www/certbot; } location / { return 301 https://your_instance.tld; } }

en	Then enable the site:

en	Then we prepare the folder in which we will later import the certificates. We assume here that you already have the plugin active. We will create the following folder (if it doesn't already exist), with the user `peertube` to make sure there are no permissions issues:

en	Now you have to configure this folder in the plugin settings, for the parameter "Certificate folders". It's important to do this now, otherwise the certificate import script will put the certificates in the wrong folder.

en	We will configure certbot to import the generated certificates into the Prosody folder. We can use the ProsodyCtl utility packaged in the plugin.

en	Note: for it to be available, the plugin must have been started at least once.

en	We will create a file `/etc/letsencrypt/renewal-hooks/deploy/prosody.sh` containing:

en	#!/bin/sh /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosodyAppImage/squashfs-root/AppRun prosodyctl \ --root \ --config /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.cfg.lua \ cert import \ room.your_instance.tld your_instance.tld /etc/letsencrypt/live

en	Then we ask to generate the certificate:

en	If certbot offers you several methods to generate the certificate, choose "nginx".

en	Normally you should now find the certificates in the configured folder.

en	Note: the first time you do this, you will have to reload Prosody. The easiest way to do this is to restart Peertube.

en	Method for the Docker case

en	This method works with the officially supported [Docker guide](https://docs.joinpeertube.org/install/docker) from PeerTube.

en	First, ensure you create a DNS entry for `room.your_instance.tld`, which points to your server. You can use a CNAME entry (or an A entry and a AAAA entry). This is necessary for Let's Encrypt to validate the domain for certificate generation.

en	Enter the directory where your `docker-compose.yml` file exists.

en	Open a shell in the certbot container:

en	Run certbot:

en	You will be presented with a series of prompts. Enter `2` for the authentication type:

en	Enter the domain name `room.your_instance.tld`:

en	Enter the directory where the PeerTube webserver serves requests for Let's Encrypt, `/var/www/certbot`:

en	You should see output like the following:

en	Run the below command inside the certbot container to give read access to the new certs and private keys to the peertube group. *Note*: This will also make the files readable to the group with id 999 on the host system. Check the groups on your system to assess this as a risk before running this command.

en	Exit the certbot container:

en	Modify your `docker-compose.yml` file, changing the `entrypoint` line under the `certbot` service to the following. This is the same as the above, but to be automatically executed after every certificate renewal.

en	Continuing to modify `docker-compose.yml`, add the certbot certificate volume into the peertube container. It should look something like this:

en	Restart your services:

en	In the livechat plugin settings from your PeerTube administration settings, set the certificate directory to the following:

en	/etc/letsencrypt/live

en	Save the plugin settings and verify Prosody can see the certificates:

en	Troubleshooting

en	If you can't make it work, you can use the diagnostic tool (there is a button on top of the plugin settings page), and take a close look on the «Prosody check» section.

en	Plugin Peertube Livechat settings - External Authentication

en	External Authentication

en	Users that are not connected to your Peertube instance are joining the chat using "anonymous accounts" (they can freely choose a nickname, and will be assigned a random avatar).

en	You can enable some external authentication methods to allow user to create chat accounts. In such case their nickname and avatar will be automatically initialized with the remote account information.

en	Such "external account users" will be easier to moderate than anonymous accounts.

en	This also allows user to join the chat without creating Peertube account (in case your instance has closed registration for example, or without waiting for account approval).

en	![External login button](/peertube-plugin-livechat/images/external_login_button.png?classes=shadow,border&height=200px)

en	![External login dialog - OpenID Connect](/peertube-plugin-livechat/images/external_login_dialog_oidc.png?classes=shadow,border&height=200px)

en	This page will describe available authentication methods.

en	For the user documentation, see [user documentation](/peertube-plugin-livechat/documentation/user/viewers/)

en	OpenID Connect

en	This feature is still experimental. This feature is available with the plugin version >= 9.0.0.

en	You can configure one external [OpenID Connect](https://openid.net/developers/how-connect-works/) compatible provider.

en	Doing so, you can for example use your website for Single Sign-On.

en	Popular CMS softwares (Wordpess, ...) offers plugins implementing OpenID Connect.

en	To enable this feature, first you have to create a client on your provider side (check the related documentation for enabling OpenID Connect). Then go to the [plugin settings](/peertube-plugin-livechat/documentation/admin/settings), and enable "{{% livechat_label external_auth_custom_oidc_label %}}".

en	Note: if you want to restrict allowed redirection urls on the provider side (best security practice), the plugin will show you the url to allow. Just copy it in your OpenID Connect application configuration.

en	You will now have to fill some settings.

en	This is the button label in the following screenshot:

en	For now, it is not possible to localize this label.

en	Your OpenID Connect provider must implement the [discovery URL](https://openid.net/specs/openid-connect-discovery-1_0.html). Just set here the discovery url, that should be something like `https://example.com/.well-known/openid-configuration`.

en	Note: if your provider use the standard `/.well-known/openid-configuration` path, you can omit it. For example `https://accounts.google.com` will work.

en	Your application Client ID.

en	You application Client secret.

en	Google, Facebook, ...

en	In addition to that, you can also configure one or several "standard" Open ID Connect provider (Google, Facebook, ...).

en	For these providers, discovery url and button label are preset. You just have to create an OAuth2 application on the provider side, and configure Client ID and Client Secret.

en	If you think of a standard provider that is not available, you can ask for implementation by [opening a new issue](/peertube-plugin-livechat/issues/).

en	If the button does not appear for end users, there might be a configuration issue. You can try the [diagnostic tool](/peertube-plugin-livechat/documentation/installation/troubleshooting/) to get more information.

en	Note: if you are connected to your Peertube account, the button will never show. So use a private browser window to test.

en	If the button is displayed but is not working, check your Peertube logs. It could be because the remote service does not use standard scopes or attribute names.

en	More to come

en	Other authentication methods will be implemented in the future.

en	Plugin Peertube Livechat administration

en	Admin documentation

en	Plugin Peertube Livechat settings

en	Settings

en	This section describes the plugin settings page.

en	When pressing the «List rooms» button, all existing chatrooms will be listed. You can then find them and moderated them.

en	Federation

en	Following settings concern the federation with other Peertube instances, and other fediverse softwares.

en	See the detailed documentation page:

en	[External Authentication](/peertube-plugin-livechat/documentation/admin/external_auth/)

en	Channel advanced configuration

en	Following settings concern the advanced channel options: users will be able to add some customization on their channels, activate the moderation bot, ...

en	If you encounter any issue with this feature, you can disable it.

en	Chat behaviour

en	This feature enables a «share chat link» modal. With this modal, you can generate URLs to join the chat. The chat can be customized (readonly mode, use the current theme, ...).

en	You can for example generate a readonly URL and use it in OBS to integrate the chat in your live stream!

en	This settings allows you to choose who can access this modal.

en	The video owner will be able to activate web chats.

en	Note: for now this feature simply hide the chat. In a future release, the chat will be replaced by a message saying «please log in to [...]». See [v5.7.0 Release Notes](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/CHANGELOG.md#570) for more information.

en	**Important note**: If you enable this feature, and are using a custom reverse proxy on front of Peertube, please make sure that your setup is correctly configured to forward real user's IPs to Peertube. Otherwise it could block all anonymous users at once.

en	Theming

en	You can choose from several different sets the default avatars that will be used for chat users.

en	{{% livechat_label avatar_set_option_sepia %}}: [David Revoy's Peertube avatar generator](https://www.peppercarrot.com/extras/html/2023_peertube-generator/), [CC-By](https://creativecommons.org/licenses/by/4.0/) license

en	![Sepia](/peertube-plugin-livechat/images/avatar_sepia.png?classes=shadow,border&height=40px)

en	{{% livechat_label avatar_set_option_cat %}}: [David Revoy's cat avatar generator](https://www.peppercarrot.com/extras/html/2016_cat-generator/), [CC-By](https://creativecommons.org/licenses/by/4.0/) license

en	![Cats](/peertube-plugin-livechat/images/avatar_cat.png?classes=shadow,border&height=40px)

en	{{% livechat_label avatar_set_option_bird %}}: [David Revoy's bird avatar generator](https://www.peppercarrot.com/extras/html/2019_bird-generator/), [CC-By](https://creativecommons.org/licenses/by/4.0/) license

en	![Birds](/peertube-plugin-livechat/images/avatar_bird.png?classes=shadow,border&height=40px)

en	{{% livechat_label avatar_set_option_fenec %}}: [David Revoy's fenec/mobilizon avatar generator](https://www.peppercarrot.com/extras/html/2020_mobilizon-generator/), [CC-By](https://creativecommons.org/licenses/by/4.0/) license

en	![Fenecs](/peertube-plugin-livechat/images/avatar_fenec.png?classes=shadow,border&height=40px)

en	{{% livechat_label avatar_set_option_abstract %}}: [David Revoy's Abstract avatar generator](https://www.peppercarrot.com/extras/html/2017_abstract-generator/index.php), [CC-By](https://creativecommons.org/licenses/by/4.0/) license

en	![Abstracts](/peertube-plugin-livechat/images/avatar_abstract.png?classes=shadow,border&height=40px)

en	{{% livechat_label avatar_set_option_legacy %}}: Based on [David Revoy' work](https://www.davidrevoy.com), [AGPL-v3](https://www.gnu.org/licenses/agpl-3.0.en.html) license

en	![Legacy](/peertube-plugin-livechat/images/avatar_legacy.jpg?classes=shadow,border&height=40px)

en	If you can't see the change immediatly, it could be because of your browser cache. Just clear your browser session storage, or restart it.

en	You can choose which theme to use for ConverseJS:

en	Peertube theme: this is a special theme, made especially for peertube's integration.

en	Default ConverseJS theme: this is the default ConverseJS theme.

en	ConverseJS concord theme: this is a theme provided by ConverseJS.

en	Chat server advanced settings

en	The plugin comes with an AppImage that is used to run the [Prosody XMPP server](https://prosody.im). If this AppImage is not working, you can fallback to the Prosody that is packaged for your server. Just install the `prosody` package.

en	This settings should only be used if the plugin is broken, and waiting for a patch.

en	If this settings is left empty, and you are using Peertube >= 5.1 or later, the plugin will use values from your Peertube configuration file to guess on which interface and port request have to be done.

en	In last resort, it will use your Peertube public URI. So, any API Call will go throught your Nginx server. This could fail in some case: for example if you are in a Docker container, where the public hostname does not resolve to the correct IP. In such case, try changing the "{{% livechat_label prosody_peertube_uri_label %}}" settings, by setting `http://127.0.0.1:9000` (assuming 9000 is the port on which Peertube listen, ask your instance administrators if you don't know).

en	This setting enable XMPP clients to connect to the built-in Prosody server. For now, this option **only allows connections from localhost clients**.

en	As example, this option can allow an instance of Matterbridge (once it could use anonymous login) *on the same machine* to bridge your chat with another services like a Matrix room.

en	This settings enable XMPP external components to connect to the server. By default, this option **only allows connections from localhost components**. You have to change the "{{% livechat_label prosody_components_interfaces_label %}}" value to listen on other network interfaces.

en	This feature could be used to connect bridges or bots.

en	More informations on Prosody external components [here](https://prosody.im/doc/components).

en	Plugin documentation

en	For now, the plugin only works out of the box for x86_64 and arm64 CPU architecture. Here are some instructions for other CPU architectures.

en	Known issues: CPU Compatibility

en	The Prosody AppImage included in the plugin will only work on x86_64 and arm64 CPU. It is not compatible with other CPU architectures.

en	To use the plugin, you will have to manually install Prosody on your server (see below).

en	Note: the plugin requires Prosody >= 0.12.0. If you are using an older version, Chat Federation could be broken, and it could have some unexpected behaviour.

en	Once it is done, you have to check `Use system Prosody` in the plugin settings.

en	On non-docker Peertube installation

en	For standard installation, you just have to install the official `prosody` package for your linux distribution.

en	For example, on Debian/Ubuntu:

en	You can then disable the service that starts automatically when you install Prosody (the plugin will launch a Prosody process, there is no need for the service to run). For example, on Debian/Ubuntu (and other Systemd based linux distributions):

en	Warning: do not disable Prosody if it is used for another service on your server, like for example Jitsi.

en	Docker

en	You will have to generate a Peertube image that includes Prosody in the same container that Peertube. I know this is not the standard way to do this with Docker, but keep in mind it is a temporary workaround.

en	To generate and use such an image, please refer to the Docker documentation. The Docker file to generate the image should be:

en	You have to disable `metronome` (the XMPP server provided by Yunohost), and install `prosody`.

en	This is already done by the Yunohost Peertube application, as it was required for the plugin before the v6.0.0.

en	But it may be removed in a near feature (to avoid drawbacks of this method). I have to discuss with Yunohost team, to decide how we can do to minimize drawbacks, and maximize compatibility.

en	Plugin peertube-plugin-livechat installation guide

en	Installation guide

en	Before updating to a major release, please read the release notes and breaking changes list : [CHANGELOG](https://github.com/JohnXLivingston/peertube-plugin-livechat/blob/main/CHANGELOG.md).

en	To install or update the plugin, **just use the Peertube web admin interface**.

en	Here are some other more specific instructions:

en	Some classic mistakes and workarounds.

en	I just installed/upgraded the plugin, but nothing happens

en	If you have just installed/upgraded the plugin, but nothing happens (no chat, no settings, buttons in the settings page does not work, ...), just try to reload the page.

en	Diagnostic tool

en	If the chat does not work, there is a diagnostic tool in the plugin's settings pages.

en	Open the plugin settings, and click on the "launch diagnostic" button.

en	![Launch diagnostic](/peertube-plugin-livechat/images/launch_diagnostic.png?classes=shadow,border&height=200px)

en	If there is any error in the diagnostic page, you can search in this page for a solution, or refer to the [Bug tracking documentation page](/peertube-plugin-livechat/issues/) if you can't find any response.

en	![Diagnostic result](/peertube-plugin-livechat/images/diagnostic.png?classes=shadow,border&height=200px)

en	Chat does not load

en	Internal API calls

en	In some case (like for some Docker Peertube installation), the diagnostic tools displays an error for the test called "API Prosody -> Peertube is KO".

en	In such case, try changing the "{{% livechat_label prosody_peertube_uri_label %}}" settings, by setting `http://127.0.0.1:9000` (assuming 9000 is the port on which Peertube listen, ask your instance administrators if you don't know).

en	Check the help for [this settings](/peertube-plugin-livechat/documentation/admin/settings/) for more information.

en	Websocket

en	If everything is fine in the diagnostic tools, but chat windows remains empty: it can be a Websocket issue. Since Peertube version 5.0.0, there are some additional configuration to do on the server side. Check with the instance administrators that they did not forgot to apply changes listed in the [Peertube v5.0.0 release notes](https://github.com/Chocobozzz/PeerTube/blob/master/CHANGELOG.md#v500).

en	You can confirm that it is a Websocket issue by opening your browser console, and checking for error logs talking about failed Websocket connection.

en	If you can't fix this immediatly, you can disable Websocket by unchecking "{{% livechat_label disable_websocket_label %}}" in the plugin setting page. In such case, you should also check "{{% livechat_label federation_dont_publish_remotely_label %}}", as chat federation won't work without Websocket.

en	Important notes when upgrading for an older version.

en	Upgrade from version older than 6.0.0

en	IMPORTANT NOTE

en	Since version v6.0.0, this plugin does not need any Prosody installation.

en	If you were using this plugin before this version, and if you had installed Prosody manually, you can safely uninstall Prosody.

en	If you were using the custom Peertube docker image that is embedding Prosody, you can switch back to the official Peertube image.

en	Plugin peertube-plugin-livechat user documentation

en	User documentation

en	Documentation to stream the chat content using OBS.

en	[OBS](https://obsproject.com) is a popular Free And Open Source streaming software, with advanced capacities for your live streams. In the current page, you will find some advices to handle your live chats using OBS.

en	OBS Overlay

en	You can easily include the chat in your stream.

en	![Embeding the chat in a live stream](/peertube-plugin-livechat/images/embed_chat_in_livestream.png?classes=shadow,border&height=200px)

en	You can use the "{{% livechat_label share_chat_link %}}" feature to generate an URL to your chat. This button should be near the chat if you are the video owner (unless it was desactivated by your server admins).

en	Check the "{{% livechat_label read_only %}}" checkbox in the modal.

en	![Share link popup](/peertube-plugin-livechat/images/share_readonly.png?classes=shadow,border&height=200px)

en	Then use this link as a "web browser source" in OBS.

en	![Embeding the chat in OBS](/peertube-plugin-livechat/images/embed_chat_in_obs.png?classes=shadow,border&height=200px)

en	You can use the "{{% livechat_label transparent_background %}}" option to have a transparent background in OBS. If you want to customize the background transparency, you can add this CSS in your OBS browser source's settings:

en	In the previous CSS snippet, you can of course change the color or the transparency, by adapting the color values.

en	Note: you can entirely customize chat colors. This is undocumented yet, but you can try this: in the modal, check «use curent theme colors», then you can try to manually change color values in the URL. You must use valid CSS color values, and they must be properly URL encoded.

en	Mixing multiple chats in your live stream

en	You can use the [social_stream browser extension](https://github.com/steveseguin/social_stream#readme) to mix multiple chat source (from Peertube, Twitch, Youtube, Facebook, ...) and include their contents in your live stream. The compatibility with this plugin was added in recent versions.

en	Some basics about how to setup and use the chat for your live stream

en	Some basics

en	Enabling the chat for you live streams

en	Instance administrators can choose to disable or enable chat in specific cases. Information in this section are only true in the default case.

en	When you create or modify a Peertube live, there is a "plugin settings" tab:

en	![New live](/peertube-plugin-livechat/images/new_live.png?classes=shadow,border&height=200px)

en	In the "plugin settings" tab, there is a "{{% livechat_label use_chat %}}" checkbox. Just check or uncheck it to enable or disable the chat associated to your video.

en	![Activate the chat](/peertube-plugin-livechat/images/new_live_activate_chat.png?classes=shadow,border&height=200px)

en	There can be other settings in this tab, depending on plugins installed on your Peertube instance.

en	Per channel chat

en	On the instance level, Peertube's administrators can choose if chat rooms are unique per video, or if there will be an unique chat room per channel. Please contact your instance's administrators for more information on how they configure the livechat plugin.

en	Share the chat

en	On top of the chat, there is a "{{% livechat_label share_chat_link %}}" button.

en	This button opens a popup, where you can obtain an url to join the chat. This url can be shared.

en	You can customize some options:

en	{{% livechat_label read_only %}}: you will only be able to read the chat, not write. This is useful to include the chat content in your live stream (see the [OBS documentation](/peertube-plugin-livechat/documentation/user/obs)).

en	{{% livechat_label use_current_theme_color %}}: if checked, your current theme colors will be added to the url, so that any user that opens the link will have the same color set.

en	{{% livechat_label generate_iframe %}}: instead of an url, you will obtain an HTML snippet that you can add to your website to embed the chat.

en	The "{{% livechat_label share_chat_link %}}" popup can also contain a "{{% livechat_label connect_using_xmpp %}}" tab. This will only be available if your instance's administators have enabled an correctly configured this option. Using this option, you can provide a link to join the chat using any [XMPP client software](https://en.wikipedia.org/wiki/XMPP#Clients). Using such softwares can for example facilitate moderation actions.

en	Moderation

en	Please refer to the [moderation documentation](/peertube-plugin-livechat/documentation/user/streamers/moderation).

en	Include the chat in your video stream

en	Please refer to the [OBS documentation](/peertube-plugin-livechat/documentation/user/obs).

en	Chat persistence

en	By default, the chat is persistent. This means that the room content will be kept for a while. User joining will see messages posted before their arrival.

en	You can change the persistence behaviour. [Open the chat dropdown menu](/peertube-plugin-livechat/documentation/user/viewers), and click on "Configure".

en	![Chat menu](/peertube-plugin-livechat/images/top_menu.png?classes=shadow,border&height=200px)

en	There are several options that can be changed.

en	![Configure chat room](/peertube-plugin-livechat/images/configure.png?classes=shadow,border&height=200px)

en	You can for example set the default and maximum number of messages to return to 0, so that new incomers won't see any previously sent message.

en	You can also uncheck "enable archiving": if unchecked, messages will be pruned if the server restarts.

en	By unchecking "Persistent", the room will be cleared if there is no more participant.

en	Delete the chat content

en	If you want to delete the chat content, [open the chat dropdown menu](/peertube-plugin-livechat/documentation/user/viewers), then click on "Destroy". A popup will open, asking a confirmation.

en	The chat will be automatically recreated each time someone tries to join it as long as the video exists, and has the "{{% livechat_label use_chat %}}" feature activated.

en	The bot can respond to several commands.

en	Commands

en	![Commands configuration](/peertube-plugin-livechat/images/bot_commands.png?classes=shadow,border&height=400px)

en	You can setup several commands.

en	The bot can automatically moderate messages containing forbidden words.

en	Forbidden words

en	![Forbidden words configuration](/peertube-plugin-livechat/images/bot_forbidden_words.png?classes=shadow,border&height=400px)

en	![Deleted message](/peertube-plugin-livechat/images/bot_deleted_message.png?classes=shadow,border&height=100px)

en	You can fill several "{{% livechat_label livechat_configuration_channel_forbidden_words_label %}}" fields. When a user sends a message that match the configured criteria, the message will automatically be deleted.

en	In this field, you can set several words, group of words, or "regular expressions".

en	Each time a user sends a message, these words will be tested. If the message containes one of them, the message will be deleted.

en	You can for example fill this field with a swear words list.

en	To get some examples, please check these [forbidden words suggestions](https://framagit.org/Livingston/peertube-plugin-livechat/-/tree/main/support/forbidden_words).

en	If you have some usefull words lists, you are welcome to contribute to this suggestion page. There are in the `support/forbidden_words` folder of the livechat source code. See the [contribution guide](/peertube-plugin-livechat/contributing/) for more information.

en	These words are case insensitive.

en	This features is still experimental. There might be some issues with non-latin alphabets. You can [open an issue](https://github.com/JohnXLivingston/peertube-plugin-livechat/issues) to report your problems.

en	By checking this option, each line of the "{{% livechat_label livechat_configuration_channel_forbidden_words_label %}}" field will be considered as a [regular expression](https://en.wikipedia.org/wiki/Regular_expression).

en	Chat bot setup

en	Chat bot

en	This feature comes with the livechat plugin version 8.0.0, and can be disabled by your instance's admins.

en	You can enable a chat bot on your chatrooms. The bot configuration is made channel per channel, and will apply to all related videos' chatrooms.

en	![Channel configuration](/peertube-plugin-livechat/images/channel_configuration.png?classes=shadow,border&height=400px)

en	To access this page, check the [channel configuration documentation](/peertube-plugin-livechat/documentation/user/streamers/channel).

en	Once there, you can enable the bot, and setup several options:

en	The bot will reload instantly when you save the page.

en	The bot can send periodically some messages.

en	Timers

en	If there is no user in the chatroom, the bot won't send any message.

en	![Timers configuration](/peertube-plugin-livechat/images/bot_quotes.png?classes=shadow,border&height=200px)

en	Peertube channel chatrooms configuration

en	Channel configuration
ar	معلومات عامة

en	In the Peertube left menu, there is a "{{% livechat_label menu_configuration_label %}}" entry:

en	![Chatrooms menu](/peertube-plugin-livechat/images/chatrooms_menu.png?classes=shadow,border&height=400px)

en	This "{{% livechat_label menu_configuration_label %}}" link takes you to a list of your channels. By clicking on a channel, you will then be able to setup some options for your channels:

en	Here you can configure:

en	[The slow mode](/peertube-plugin-livechat/documentation/user/streamers/slow_mode)

en	[The chat bot](/peertube-plugin-livechat/documentation/user/streamers/bot)

en	More features to come...

en	How to setup the chat for your live stream

en	For streamers

en	Plugin peertube-plugin-livechat advanced moderation features

en	This section is still incomplete.

en	This page describes the behaviour of livechat versions >= 10.0.0. There were some changes in the way we manage access rights for Peertube administrators and moderators.

en	The chat bot

en	You can use a chat bot, that will help you for moderation. Check [the chat bot documentation](/peertube-plugin-livechat/documentation/user/streamers/bot) for more information.

en	Accessing moderation tools

en	You can access room settings and moderation tools using the [chat dropdown menu](/peertube-plugin-livechat/documentation/user/viewers) at the top of the chat.

en	The video owner will be owner of the chat room. This means he can configure the room, delete it, promote other users as admins, ...

en	Starting with livechat v10.0.0, Peertube instance's admins and moderators have no special rights on rooms by default. However, they have a special button available on top of the chat: "{{% livechat_label promote %}}". Clicking this button will give them owner access on the room.

en	You can use [ConverseJS moderation commands](https://conversejs.org/docs/html/features.html#moderating-chatrooms) to moderate the room. When you open the chat room in full screen, there will also be a menu with dedicated commands on the top right.

en	Roles and affiliations

en	There are several roles that can be assignated to users in chat rooms: owner, moderators, member, ...

en	You can promote users as moderators, if you need some help.

en	Delete room content

en	You can delete old rooms: join the room, and use the menu on the top to destroy the room.

en	Instance moderation

en	As Peertube instance moderator or administrator, you will probably need to check that your users are not behaving badly.

en	You can list all existing chatrooms: in the plugin settings screen, there is a button «List rooms».

en	From there, you can also promote yourself as room moderator by using the "{{% livechat_label promote %}}" button on the right.

en	Plugin peertube-plugin-livechat slow mode

en	Slow mode

en	This feature comes with the livechat plugin version 8.3.0.

en	As a streamer, you can choose to rate limit your viewers messages in the chat.

en	This can be really usefull to:

en	avoid message flooding

en	avoid unreadable chat if there are many viewers talking

en	You can set a number of seconds that users will have to wait after sending a message, before sending another.

en	This limitation does not apply to moderators.

en	Slow mode option

en	On the [channel configuration page](/peertube-plugin-livechat/documentation/user/streamers/channel), you can set the slow mode option:

en	![Channel configuration / Slow Mode](/peertube-plugin-livechat/images/slow_mode_channel_option.png?classes=shadow,border&height=400px)

en	This value will apply as a default value for all your channel's chatrooms.

en	Setting the value to `0` will disable the feature.

en	Setting the value to a positive integer will set the period during which users will not be able to post additional messages.

en	To modify the value for an already existing room, just open the room "configuration" menu (on top of the chat window), and change the slow mode value in the configuration form.

en	For viewers

en	If the slow mode is enabled, users will be informed by a message.

en	![Slow mode infobox](/peertube-plugin-livechat/images/slow_mode.png?classes=shadow,border&height=400px)

en	When they send a message, the input field will be disabled for X seconds (where X is the slow mode duration).

en	You can handle tasks and task lists with your moderation team.

en	Tasks / To-do lists

en	This feature comes with the livechat plugin version 10.0.0.

en	The livechat plugin includes a Task Application: a kind of "to-do list" feature where you can create task lists and add tasks to them. Every room's admins have access to these tasks, so you can edit them collaboratively.

en	You can for example use the Task Application to:

en	prepare a list of themes you want to discuss during your livestream, so you can be sure you won't forget anything

en	highlight questions from your viewers, so you can come back to them later without forgetting to answer them

en	...

en	Using the Task Application

en	Opening the Task Application

en	To open the Task Application, there is a "{{% livechat_label "tasks" %}}" button in the top chat menu:

en	![Opening the Task Application](/peertube-plugin-livechat/images/task_open_app_video.png?classes=shadow,border&height=200px)

en	![Opening the Task Application](/peertube-plugin-livechat/images/task_open_app_fullpage.png?classes=shadow,border&height=200px)

en	Clicking this button will toggle the Task Application display:

en	![Task Application](/peertube-plugin-livechat/images/task_app_video_1.png?classes=shadow,border&height=200px)

en	![Task Application](/peertube-plugin-livechat/images/task_app_fullpage_1.png?classes=shadow,border&height=200px)

en	To have more space and better readability, open the chat in full-page mode.

en	Access rights

en	Every room's admins have access to the Task Application (read and write access).

en	When you promote someone as room admin or owner, they gets instant access to the Task Application. When you remove admin or owner rights to someone, they instantly lose access to the Task Application.

en	Task lists

en	By default, there is one task list that has the same name as your livestream.

en	You can use the form at the bottom to create a new task list. You can also edit existing task lists using the edit button, or delete any task list. Deleting a task list will also delete all its tasks.

en	Task lists are sorted alphabetically.

en	![Task lists](/peertube-plugin-livechat/images/task_app_task_lists.png?classes=shadow,border&height=200px)

en	All modification are instantly visible in all your browser tabs, and for all room's admins.

en	Tasks

en	Create tasks

en	You can create a task using the button on the right of task lists. This opens a form with two fields: a mandatory task name, and an optional description.

en	![Task form](/peertube-plugin-livechat/images/task_app_task_form.png?classes=shadow,border&height=200px)

en	![Task created](/peertube-plugin-livechat/images/task_app_task_1.png?classes=shadow,border&height=200px)

en	Edit tasks

en	Tasks can be edited by using the edit button on the right.

en	Tasks can be marked complete (or uncomplete) by clicking directly on the checkbox in the list.

en	![Tasks](/peertube-plugin-livechat/images/task_app_task_2.png?classes=shadow,border&height=200px)

en	Sorting tasks / change task list

en	You can sort tasks, or move tasks from one list to another, simply using drag & drop.

en	![Drag and drop to sort](/peertube-plugin-livechat/images/task_drag_drop.png?classes=shadow,border&height=200px)

en	![Drag and drop to move to another list](/peertube-plugin-livechat/images/task_drag_drop_task_list.png?classes=shadow,border&height=200px)

en	Create a task from a chat message

en	You can create a task from a message in a chat, using the "{{% livechat_label "task_create" %}}" button in the dropdown menu at the right of the message. This will open a dialog box where you can choose which task list you want to add the task into. The task name will be the user nickname, and the task description the message content.

en	![Create task from message](/peertube-plugin-livechat/images/task_from_message_1.png?classes=shadow,border&height=200px)

en	![Choose the task list](/peertube-plugin-livechat/images/task_from_message_2.png?classes=shadow,border&height=200px)

en	![Task created](/peertube-plugin-livechat/images/task_from_message_3.png?classes=shadow,border&height=200px)

en	Using this feature, for example, you can ask your moderators to highlight all chat questions, so you can see them at a glance during your livestream, and check them as answered.

en	How to chat for stream viewers

en	Joining chat rooms

en	When you are watching a Peertube video that has the chat activated, you will see the chat next to the video:

en	![Chat screenshot](/peertube-plugin-livechat/images/chat.png?classes=shadow,border&height=200px)

en	There are two slightly different use cases, depending on wether or not you have an account on the Peertube instance. See bellow for more informations.

en	If you haven't a Peertube account

en	This feature can be disabled by the instance's adminitrators.

en	If you are not logged in on the Peertube instance where you are watching the video, you will automatically join the chat. You will be assigned a random nickname (something like "Anonymous 12345").

en	![Chat with an anonymous user](/peertube-plugin-livechat/images/chat_with_anonymous.png?classes=shadow,border&height=200px)

en	Before being able to speak in the chat room, you have to enter a nickname in the field on the bottom of the window.

en	![Joining chat when not connected](/peertube-plugin-livechat/images/chat_anonymous.png?classes=shadow,border&height=200px)

en	Log in using an external authentication provider

en	The Peertube instance can configure external authentication providers (Mastodon accounts, Google accounts, ...). In such case, you will see a "{{% livechat_label login_using_external_account %}}" button, that will open a dialog modal. In this dialog modal, there will be some buttons to connect using a remote account.

en	Once you signed in the remote account, and have granted access, your nickname and avatar (if available) will be automatically fetched. No other data will be stored. These data will be automatically deleted several hours after your quit the chat.

en	If you have a Peertube account

en	If you are connected with your Peertube account, you will automatically join the room, using your Peertube nickname and avatar.

en	If you are watching a live on an instance on which you have no account, but you have an account on another instance: if the livechat plugin is installed on both instances, it is possible to join the chat using your account. To do so, just open the video on your instance (you can for example copy/paste the video url in the search field of your instance).

en	If you have a Peertube account on another Peertube instance

en	This feature comes with the livechat plugin version 9.0.0.

en	If you have a Peertube account, but not on the current instance, there is a "{{% livechat_label login_using_external_account %}}" button. This button will open a dialog where you can enter your Peertube instance URL. Once you entered it, it will check if the livechat plugin is available on the remote instance, and if the video is available. If it is the case, you will be redirected to the video on the remote instance.

en	![External login dialog](/peertube-plugin-livechat/images/external_login_dialog.png?classes=shadow,border&height=200px)

en	Chatting

en	To send messages, just type them in the "message" field on the bottom of the screen. You can send them by pressing the enter key on your keyboard, or by clicking on the "send" button.

en	If you want to add line breaks in your messages, you can use the "shift+enter" key combination.

en	You can add emojis to your messages. You can for example use the emojis menu, or directly type emojis shortcuts like `:smiley:`.

en	You can mention other participants. To do so, you can type the first nickname letters, then press the tab key. You can also type `@`: this will directly open the menu. You can also click on a nickname in the participants list to insert it in the message field.

en	Participants list

en	To see the list of participants, just open the right menu:

en	![Participants list](/peertube-plugin-livechat/images/open_participants_list.png?classes=shadow,border&height=200px)

en	You can see that some participants have special rights (moderator, owner, ...).

en	Chat dropdown menu

en	There is a dropdown menu on the top of the chat, with some advanced features. This is especially useful for [moderation features](/peertube-plugin-livechat/documentation/user/streamers/moderation). Available features depends on your access level.

en	Opening full screen

en	On top of the chat, there is a button to open the chat in fullscreen. This will open a new browser tab with the following content:

en	![Fullscreen chat screenshot](/peertube-plugin-livechat/images/fullscreen.png?classes=shadow,border&height=200px)

en	It can be easier to chat using a full browser tab.

en	Changing nickname

en	You can change your nickname by typing `/nick your_new_nickname` in the message field.

en	You can also change your nickname using the chat menu.

en	Connect to chat using a XMPP client

en	XMPP Clients

en	This chat plugin relies on the XMPP protocol (also known as Jabber). It is therefore possible to connect to the chats using [XMPP client software](https://en.wikipedia.org/wiki/XMPP#Clients). This can be useful for example to facilitate moderation operations.

en	The features described on this page must be enabled and configured by your Peertube instance's administrators. You may therefore not have access to them.

en	If this feature is enabled on your instance, you can connect to Peertube chats using any XMPP account.

en	To get the address of the room you want to join, you can use the "share chat" button that is located above the chat:

en	![Share button](/peertube-plugin-livechat/images/share_button.png?classes=shadow,border&height=200px)

en	By default, the share button is only visible to the owner of the video, and the admins/moderators of the instance. However, admins can decide to display this button for everyone.

en	Then, choose "Connect using XMPP":

en	![Share XMPP](/peertube-plugin-livechat/images/share_xmpp_dialog.png?classes=shadow,border&height=200px)

en	Then you just have to click on "open" or copy/paste the address of the chat room into your XMPP client (using the "join a room" feature).

en	PeerTube plugin livechat

en	You can use the language selector in the left menu to view this documentation in different languages. Some translations are missing or incomplete. In this case, you'll see the English version of the text.

en	Welcome the **Peertube Livechat Plugin** documentation.

en	[Peertube](https://joinpeertube.org/) is a decentralized streaming platform, that can provide both live streaming and VOD (Video On Demand) features. The present plugin adds chatting capatibilities to your Peertube installation, allowing viewers to interract with streamers.

en	To have a glimpse on this plugin capabilities, checkout the [introduction](/peertube-plugin-livechat/intro/). For more precise informations, please find bellow the summary of this documentation.

en	You can use the searchbox in the left menu to quickly find specific documentation parts.

en	What is the livechat plugin?

en	This [Peertube](https://joinpeertube.org/) plugin is meant to provide a chat system for Peertube videos.

en	By default, once you have installed the plugin on your Peertube instance, a chat room will automatically be created for each live stream.

en	On the following screenshot, you can see a classic Peertube video page, with a chat room on the right (click on the picture to view it full screen):

en	The chat room will be accessible for all viewers, even those who don't have an account on your instance. Those "anonymous" users just have to choose a nickname before they can begin talking in the chat.

en	By default, the chat is displayed next to the video. But you can open it in another browser tab, using the button on top of it :

en	You can test the livechat plugin with this [demo page](https://www.yiny.org/w/399a8d13-d4cf-4ef2-b843-98530a8ccbae).

en	Installation

en	As a Peertube administrator, you can setup this plugin on your instance simply by using the Peertube plugin marketplace included in the administration interface. Search for "livechat", then click "install": that's it!

en	![Livechat installation](/peertube-plugin-livechat/images/installation.png?classes=shadow,border&height=200px)

en	Livechat capabilities

en	The plugin has many advanced features. As it is using the [XMPP](https://xmpp.org/) standard "under the hood", it is possible for Peertube administrators to allow advanced usages (connection using XMPP clients, chatbots, bridge to other chat protocols, ...). More information in the relevant sections of this documentation.

en	Peertube is part of the fediverse: you can create a network of Peertube instances, sharing content between them.

en	This plugin can handle federation: when viewing a livestream from a remote instance, you will join the chat room with your local account. You will be automatically connected with your current nickname and avatar.

en	Of course, for the federation to work, the plugin must be installed on both instances.

en	Some times, you have to protect your community from bad people. As an instance administrator, you can choose to disallow federation for the livechat plugin. If remote actors behave badly, streamers, moderators and administrators can ban or mute users.

en	This plugin comes with a built-in [chat bot](/peertube-plugin-livechat/documentation/user/streamers/bot/). Check its documentation for more information.

en	You can also plug in any other XMPP chat bot, using [XMPP External Components](https://prosody.im/doc/components). To do so, you just have to configure External Components access in the [plugin settings](/peertube-plugin-livechat/documentation/admin/settings).

en	When joining a room, you will see previous messages. Even those sent before you joined the room.

en	This behaviour can be changed room by room, and default retention duration can be chosen by instance's administrators.

en	Integrate the chat in your live stream

en	When using software as [OBS](https://obsproject.com) for you live stream, you can embed the chat in the video stream. This is for example useful for replays.

en	In the following screenshot, you can see a live replay, where the chat content is embeded on bottom of the video:

en	In the following screenshot, you can see an OBS setup, where the chat is included as a source in the current scene (background color can be changed, and can be transparent):

en	Other usages

en	By default, each streamer will be able to activate/deactivate the chat for their live streams.

en	But on the instance level, administrators can choose to activate the chat for all videos (live and/or VOD).

en	You can even activate the chat for specific VOD videos. This is how the [demo](https://www.yiny.org/w/399a8d13-d4cf-4ef2-b843-98530a8ccbae) page works: it is not a live stream, but I have activated the chat specifically for this video.

en	If you have new feature requests, bugs, or difficulties to setup the plugin, you can use the [Github issue tracker](https://github.com/JohnXLivingston/peertube-plugin-livechat/issues). If possible, try using english or french.

en	To have a glimpse to the roadmap for upcoming features, please refer to:

en	this [github project](https://github.com/users/JohnXLivingston/projects/1).

en	the [milestones on github](https://github.com/JohnXLivingston/peertube-plugin-livechat/milestones).

en	If you are a webdesigner or a ConverseJS/Prosody/XMPP expert, and want to help improve this plugin, you are welcome.